package cn.tqfeiyang.springplus.system.entity;

import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 系统日志实体类
 *
 * @author tqfeiyang
 * @since 2024-07-30
 */
@Data
@TableName("system_log")
public class LogEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 日志ID
     */
    @TableId(value = "log_id", type = IdType.ASSIGN_ID)
    private Long logId;

    /**
     * 日志等级
     */
    @TableField(value = "level")
    private String level;

    /**
     * 日志描述
     */
    @TableField(value = "operation")
    private String operation;

    /**
     * 日志描述
     */
    @TableField(value = "result")
    private String result;

    /**
     * 控制器
     */
    @TableField(value = "controller")
    private String controller;

    /**
     * 方法
     */
    @TableField(value = "method")
    private String method;

    /**
     * 参数
     */
    @TableField(value = "arguments")
    private String arguments;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * IP地址
     */
    @TableField(value = "client_ip")
    private String clientIp;

    /**
     * 请求地址
     */
    @TableField(value = "request_uri")
    private String requestUri;

    /**
     * 异常详情
     */
    @TableField(value = "exception_detail")
    private String exceptionDetail;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @TableField(value = "finish_time")
    private LocalDateTime finishTime;

    /**
     * 耗用时间
     */
    @TableField(value = "elapsed_time")
    private Long elapsedTime;
}